//
//  MapNode.h
//  CompGraf2
//
//  Created by Juan Niosi on 29/09/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Vector3.h"

@interface MapNode : NSObject
{
    int x;
    int y;
    MapNode *parent;
    float g;
    float h;
    Vector3 *worldPos;
}
@property (nonatomic) int x,y;
@property (nonatomic) float g;
@property (nonatomic) float h;
@property (nonatomic, retain) MapNode *parent;
@property (nonatomic, retain) Vector3 *worldPos;

- (id)initWithCoords:(int)cx:(int)cy;
- (id)initWithCoords:(int)cx:(int)cy setParent:(MapNode *)prnt;
- (BOOL)equals:(MapNode *)node;
- (BOOL)equals:(int)cx :(int)cy;
- (void)calcG;
- (void)calcH:(MapNode *)final;
- (void)updateParent:(MapNode *)prnt;
- (NSArray *)getHierarchy;
- (float)getF;
@end
